home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 3
/
Gold Medal Software - Volume 3 (Gold Medal) (1994).iso
/
music
/
5mods_2.arj
/
DEFAULTS.MOD
< prev
Wrap
Text File
|
1994-01-24
|
9KB
|
303 lines
┌───────────────────────────────────────────────────────────────────────────┐
│ Mod Name : New Default Section Mod Author: Hackmaster 'J' 1@6101 WWIVnet│
│ │
│ Difficulty: Block Read Date : 04DEC93 │
│ │
│ Version : WWIV 4.23 File Name : HJ07C.MOD or (ZIP) │
│ │
│ Description: This mod combines the T command in the xfer section and the │
│ D command from the main menu. I've also added a couple │
│ other things in to make this a One-Stop-Default Section! │
│ │
└───────────────────────────────────────────────────────────────────────────┘
-------------------------------------------------------------------------
04DEC93: Updated code for 4.23
-------------------------------------------------------------------------
29JAN93: Added the functions I omitted, by popular demand
-------------------------------------------------------------------------
24JAN93: I found the need to add some of the new userrec where users could
edit it so this mod was born!
-------------------------------------------------------------------------
Most modifications are made in DEFAULTS.C so lets start there, Search
for function void print_cur_stat and replace it with this one, also add
the function void name_change right after it as it is below.
/* MOD */
void print_cur_stat(void)
{
char s[81],s1[81];
userrec ur;
outchr(12);
npr("1. Alias : %-27.27s 9. Screen Size : %d X %d\r\n",
thisuser.name,
thisuser.screenchars,
thisuser.screenlines);
npr(" RN : %-27.27s A. ANSI : %s\r\n",
thisuser.realname,
(thisuser.sysstatus & sysstatus_ansi)?
((thisuser.sysstatus & sysstatus_color)? "Color":"Monochrome"):
"No ANSI");
npr("2. Strt : %-27.27s B. Pause Screen : %s\r\n",
thisuser.street,
(thisuser.sysstatus & sysstatus_pause_on_page)?"Yes":"No");
sprintf(s1,"%s, %s %s (%s)",
thisuser.city,
thisuser.state,
thisuser.zipcode,
thisuser.country);
npr(" City : %-27.27s C. Expert Mode : %s\r\n",
s1,
(thisuser.sysstatus & sysstatus_expert)?"On":"Off");
if (thisuser.defprot)
strcpy(s1,prot_name(thisuser.defprot));
else
strcpy(s1,"None.");
npr("3. Voice : %-27.27s D. Protocol : %-20.20s\r\n",
thisuser.phone,
s1);
npr("4. Data : %-27.27s E. Auto-Scan Dir: %s\r\n",
thisuser.dataphone,
(thisuser.sysstatus & sysstatus_nscan_file_system)?"Yes":"No");
npr("5. Comp : %-27.27s F. Extra Descrp : %d line%s\r\n",
ctypes[thisuser.comp_type],
thisuser.num_extended,thisuser.num_extended==1?"":"s");
if ((thisuser.forwardsys==0) && (thisuser.forwardusr==0))
strcpy(s1,"Normal");
else {
if (thisuser.forwardsys)
sprintf(s1,"Forward to %s #%u @%u.",
net_networks[thisuser.net_num].name,
thisuser.forwardusr,thisuser.forwardsys);
else {
if (thisuser.forwardusr==65535)
strcpy(s1,"Closed");
else {
read_user(thisuser.forwardusr,&ur);
if (ur.inact & inact_deleted) {
thisuser.forwardusr=0;
strcpy(s1,"Normal");
} else
sprintf(s1,"Forward to %s",nam(&ur,thisuser.forwardusr));
}
}
}
if (thisuser.wwiv_regnum)
sprintf(s,"%ld",thisuser.wwiv_regnum);
else
strcpy(s,"None.");
npr("6. Mail : %-27.27s G. File Tagging : %s\r\n",
s1,
(thisuser.sysstatus & sysstatus_no_tag)?"Off":"On");
npr("7. Editor: %-27.27s H. WWIV Reg # : %s\r\n",
((thisuser.defed) && (thisuser.defed<=numed))?
editors[thisuser.defed-1].description:"None.",s);
npr("8. Confer: %-27.27s I. Option lines : %d\r\n\r\n",
(thisuser.sysstatus & sysstatus_conference)?"On":"Off",
thisuser.optional_val);
npr("J. Configure N-scan for Message Bases K. Change Password\r\n");
npr("L. Configure N-scan for Directories M. Update Macros\r\n");
npr("N. Change Colors O. Change Language\r\n\r\n");
}
void name_change(int usernum)
{
char s[30],t[81];
userrec u;
read_user(usernum,&u);
nl();
npr("Enter new alias (or return for no change)? ");
input(s,30);
nl();
if (s[0]) {
if (finduser(s)<1) {
dsr(u.name);
sprintf(t," $*$ %s Changed Alias to: %s",u.name,s);
sl1(0,t);
pl(t);
strcpy(u.name,s);
isr(usernum,u.name);
write_user(usernum,&u);
topscreen();
}
else
pl(" That alias is already being used! Alias not changed.");
}
else
pl(" * Alias not changed *");
}
/* END MODIFY */
------------------------------------------------------------------------
Farther down in the file replace the function void defaults with
the one below:
/* MOD */
void defaults(void)
{
int i,i1,i2,done;
char s[81],s1[81],s2[81],ch;
done=0;
do {
print_cur_stat();
tleft(1);
if (hangup)
return;
nl();
helpl=4;
prt(2,get_string(477));
ch=onek("Q?123456789ABCDEFGHIJKLMNO");
switch(ch) {
case 'Q':
done=1;
break;
case '?':
print_cur_stat();
break;
case '1':
name_change(usernum);
break;
case '2':
input_street();
input_city();
input_state();
input_country();
input_zipcode();
break;
case '3':
input_phone();
break;
case '4':
input_dataphone();
break;
case '5':
input_comptype();
break;
case '6':
modify_mailbox();
break;
case '7':
select_editor();
break;
case '8':
if (thisuser.sysstatus & sysstatus_conference)
thisuser.sysstatus ^= sysstatus_conference;
nl();
prt(5,get_string(1152));
if (yn())
thisuser.sysstatus |= sysstatus_conference;
changedsl();
break;
case '9':
input_screensize();
break;
case 'A':
input_ansistat();
if (thisuser.sysstatus & sysstatus_extra_color)
thisuser.sysstatus ^= sysstatus_extra_color;
nl();
prt(5,get_string(480));
if (yn())
thisuser.sysstatus |= sysstatus_extra_color;
break;
case 'B':
thisuser.sysstatus ^= sysstatus_pause_on_page;
break;
case 'C':
thisuser.sysstatus ^= sysstatus_expert;
break;
case 'D':
nl();
pl(get_string(570));
nl();
helpl=40;
i=get_protocol(xf_down);
if (i>=0)
thisuser.defprot=i;
break;
case 'E':
nl();
pl(get_string(811));
outstr(get_string(812));
if (thisuser.sysstatus & sysstatus_nscan_file_system)
thisuser.sysstatus -= sysstatus_nscan_file_system;
if (yn())
thisuser.sysstatus += sysstatus_nscan_file_system;
break;
case 'F':
nl();
pl(get_string(813));
pl(get_string(814));
outstr(get_string(815));
pln(thisuser.num_extended);
prt(5,"? ");
helpl=41;
input(s,3);
if (s[0]) {
i=atoi(s);
if ((i>=0) && (i<=10))
thisuser.num_extended=i;
}
break;
case 'G':
thisuser.sysstatus ^= sysstatus_no_tag;
break;
case 'H':
enter_regnum();
break;
case 'I':
optional_lines();
break;
case 'J':
config_qscan();
break;
case 'K':
input_pw1();
break;
case 'L':
helpl=24;
config_nscan();
break;
case 'M':
make_macros();
break;
case 'N':
change_colors();
break;
case 'O':
if (num_languages>1)
input_language();
break;
}
} while ((!done) && (!hangup));
}
/* END MODIFY */
------------------------------------------------------------------------
Now remove function void xfer_defaults from file XFEROVL.C as it is
no longer needed with the new defaults function.
------------------------------------------------------------------------
Remove the following code from function void dlmainmenu in file BBS.C:
K = line to keep
- = line to remove
K case 'S':
K searchall();
K break;
- case 'T':
- helpl=32;
- xfer_defaults();
- break;
K case 'U':
K helpl=17;
------------------
Thats it recompile -- As always its not my fault if you BBS melts Down
Hackmaster 'J' 1@6101 WWIVnet